{"ast":null,"code":"import _defineProperty from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport _regeneratorRuntime from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";\nimport _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n  function adopt(value) {\n    return value instanceof P ? value : new P(function (resolve) {\n      resolve(value);\n    });\n  }\n  return new (P || (P = Promise))(function (resolve, reject) {\n    function fulfilled(value) {\n      try {\n        step(generator.next(value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function rejected(value) {\n      try {\n        step(generator[\"throw\"](value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function step(result) {\n      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n    }\n    step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n};\nimport classNames from 'classnames';\nimport RcUpload from 'rc-upload';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport * as React from 'react';\nimport { flushSync } from 'react-dom';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport LocaleReceiver from '../locale/LocaleReceiver';\nimport defaultLocale from '../locale/en_US';\nimport warning from '../_util/warning';\nimport UploadList from './UploadList';\nimport { file2Obj, getFileItem, removeFileItem, updateFileList } from './utils';\nimport useStyle from './style';\nexport var LIST_IGNORE = \"__LIST_IGNORE_\".concat(Date.now(), \"__\");\nvar InternalUpload = function InternalUpload(props, ref) {\n  var fileList = props.fileList,\n    defaultFileList = props.defaultFileList,\n    onRemove = props.onRemove,\n    _props$showUploadList = props.showUploadList,\n    showUploadList = _props$showUploadList === void 0 ? true : _props$showUploadList,\n    _props$listType = props.listType,\n    listType = _props$listType === void 0 ? 'text' : _props$listType,\n    onPreview = props.onPreview,\n    onDownload = props.onDownload,\n    onChange = props.onChange,\n    onDrop = props.onDrop,\n    previewFile = props.previewFile,\n    customDisabled = props.disabled,\n    propLocale = props.locale,\n    iconRender = props.iconRender,\n    isImageUrl = props.isImageUrl,\n    progress = props.progress,\n    customizePrefixCls = props.prefixCls,\n    className = props.className,\n    _props$type = props.type,\n    type = _props$type === void 0 ? 'select' : _props$type,\n    children = props.children,\n    style = props.style,\n    itemRender = props.itemRender,\n    maxCount = props.maxCount,\n    _props$data = props.data,\n    data = _props$data === void 0 ? {} : _props$data,\n    _props$multiple = props.multiple,\n    multiple = _props$multiple === void 0 ? false : _props$multiple,\n    _props$action = props.action,\n    action = _props$action === void 0 ? '' : _props$action,\n    _props$accept = props.accept,\n    accept = _props$accept === void 0 ? '' : _props$accept,\n    _props$supportServerR = props.supportServerRender,\n    supportServerRender = _props$supportServerR === void 0 ? true : _props$supportServerR;\n  // ===================== Disabled =====================\n  var disabled = React.useContext(DisabledContext);\n  var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n  var _useMergedState = useMergedState(defaultFileList || [], {\n      value: fileList,\n      postState: function postState(list) {\n        return list !== null && list !== void 0 ? list : [];\n      }\n    }),\n    _useMergedState2 = _slicedToArray(_useMergedState, 2),\n    mergedFileList = _useMergedState2[0],\n    setMergedFileList = _useMergedState2[1];\n  var _React$useState = React.useState('drop'),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    dragState = _React$useState2[0],\n    setDragState = _React$useState2[1];\n  var upload = React.useRef(null);\n  process.env.NODE_ENV !== \"production\" ? warning('fileList' in props || !('value' in props), 'Upload', '`value` is not a valid prop, do you mean `fileList`?') : void 0;\n  process.env.NODE_ENV !== \"production\" ? warning(!('transformFile' in props), 'Upload', '`transformFile` is deprecated. Please use `beforeUpload` directly.') : void 0;\n  // Control mode will auto fill file uid if not provided\n  React.useMemo(function () {\n    var timestamp = Date.now();\n    (fileList || []).forEach(function (file, index) {\n      if (!file.uid && !Object.isFrozen(file)) {\n        file.uid = \"__AUTO__\".concat(timestamp, \"_\").concat(index, \"__\");\n      }\n    });\n  }, [fileList]);\n  var onInternalChange = function onInternalChange(file, changedFileList, event) {\n    var cloneList = _toConsumableArray(changedFileList);\n    // Cut to match count\n    if (maxCount === 1) {\n      cloneList = cloneList.slice(-1);\n    } else if (maxCount) {\n      cloneList = cloneList.slice(0, maxCount);\n    }\n    // Prevent React18 auto batch since input[upload] trigger process at same time\n    // which makes fileList closure problem\n    flushSync(function () {\n      setMergedFileList(cloneList);\n    });\n    var changeInfo = {\n      file: file,\n      fileList: cloneList\n    };\n    if (event) {\n      changeInfo.event = event;\n    }\n    onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo);\n  };\n  var mergedBeforeUpload = function mergedBeforeUpload(file, fileListArgs) {\n    return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {\n      var beforeUpload, transformFile, parsedFile, result;\n      return _regeneratorRuntime().wrap(function _callee$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n              beforeUpload = props.beforeUpload, transformFile = props.transformFile;\n              parsedFile = file;\n              if (!beforeUpload) {\n                _context.next = 13;\n                break;\n              }\n              _context.next = 5;\n              return beforeUpload(file, fileListArgs);\n            case 5:\n              result = _context.sent;\n              if (!(result === false)) {\n                _context.next = 8;\n                break;\n              }\n              return _context.abrupt(\"return\", false);\n            case 8:\n              // Hack for LIST_IGNORE, we add additional info to remove from the list\n              delete file[LIST_IGNORE];\n              if (!(result === LIST_IGNORE)) {\n                _context.next = 12;\n                break;\n              }\n              Object.defineProperty(file, LIST_IGNORE, {\n                value: true,\n                configurable: true\n              });\n              return _context.abrupt(\"return\", false);\n            case 12:\n              if (typeof result === 'object' && result) {\n                parsedFile = result;\n              }\n            case 13:\n              if (!transformFile) {\n                _context.next = 17;\n                break;\n              }\n              _context.next = 16;\n              return transformFile(parsedFile);\n            case 16:\n              parsedFile = _context.sent;\n            case 17:\n              return _context.abrupt(\"return\", parsedFile);\n            case 18:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, _callee);\n    }));\n  };\n  var onBatchStart = function onBatchStart(batchFileInfoList) {\n    // Skip file which marked as `LIST_IGNORE`, these file will not add to file list\n    var filteredFileInfoList = batchFileInfoList.filter(function (info) {\n      return !info.file[LIST_IGNORE];\n    });\n    // Nothing to do since no file need upload\n    if (!filteredFileInfoList.length) {\n      return;\n    }\n    var objectFileList = filteredFileInfoList.map(function (info) {\n      return file2Obj(info.file);\n    });\n    // Concat new files with prev files\n    var newFileList = _toConsumableArray(mergedFileList);\n    objectFileList.forEach(function (fileObj) {\n      // Replace file if exist\n      newFileList = updateFileList(fileObj, newFileList);\n    });\n    objectFileList.forEach(function (fileObj, index) {\n      // Repeat trigger `onChange` event for compatible\n      var triggerFileObj = fileObj;\n      if (!filteredFileInfoList[index].parsedFile) {\n        // `beforeUpload` return false\n        var originFileObj = fileObj.originFileObj;\n        var clone;\n        try {\n          clone = new File([originFileObj], originFileObj.name, {\n            type: originFileObj.type\n          });\n        } catch (e) {\n          clone = new Blob([originFileObj], {\n            type: originFileObj.type\n          });\n          clone.name = originFileObj.name;\n          clone.lastModifiedDate = new Date();\n          clone.lastModified = new Date().getTime();\n        }\n        clone.uid = fileObj.uid;\n        triggerFileObj = clone;\n      } else {\n        // Inject `uploading` status\n        fileObj.status = 'uploading';\n      }\n      onInternalChange(triggerFileObj, newFileList);\n    });\n  };\n  var onSuccess = function onSuccess(response, file, xhr) {\n    try {\n      if (typeof response === 'string') {\n        response = JSON.parse(response);\n      }\n    } catch (e) {\n      /* do nothing */\n    }\n    // removed\n    if (!getFileItem(file, mergedFileList)) {\n      return;\n    }\n    var targetItem = file2Obj(file);\n    targetItem.status = 'done';\n    targetItem.percent = 100;\n    targetItem.response = response;\n    targetItem.xhr = xhr;\n    var nextFileList = updateFileList(targetItem, mergedFileList);\n    onInternalChange(targetItem, nextFileList);\n  };\n  var onProgress = function onProgress(e, file) {\n    // removed\n    if (!getFileItem(file, mergedFileList)) {\n      return;\n    }\n    var targetItem = file2Obj(file);\n    targetItem.status = 'uploading';\n    targetItem.percent = e.percent;\n    var nextFileList = updateFileList(targetItem, mergedFileList);\n    onInternalChange(targetItem, nextFileList, e);\n  };\n  var onError = function onError(error, response, file) {\n    // removed\n    if (!getFileItem(file, mergedFileList)) {\n      return;\n    }\n    var targetItem = file2Obj(file);\n    targetItem.error = error;\n    targetItem.response = response;\n    targetItem.status = 'error';\n    var nextFileList = updateFileList(targetItem, mergedFileList);\n    onInternalChange(targetItem, nextFileList);\n  };\n  var handleRemove = function handleRemove(file) {\n    var currentFile;\n    Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) {\n      var _a;\n      // Prevent removing file\n      if (ret === false) {\n        return;\n      }\n      var removedFileList = removeFileItem(file, mergedFileList);\n      if (removedFileList) {\n        currentFile = Object.assign(Object.assign({}, file), {\n          status: 'removed'\n        });\n        mergedFileList === null || mergedFileList === void 0 ? void 0 : mergedFileList.forEach(function (item) {\n          var matchKey = currentFile.uid !== undefined ? 'uid' : 'name';\n          if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) {\n            item.status = 'removed';\n          }\n        });\n        (_a = upload.current) === null || _a === void 0 ? void 0 : _a.abort(currentFile);\n        onInternalChange(currentFile, removedFileList);\n      }\n    });\n  };\n  var onFileDrop = function onFileDrop(e) {\n    setDragState(e.type);\n    if (e.type === 'drop') {\n      onDrop === null || onDrop === void 0 ? void 0 : onDrop(e);\n    }\n  };\n  // Test needs\n  React.useImperativeHandle(ref, function () {\n    return {\n      onBatchStart: onBatchStart,\n      onSuccess: onSuccess,\n      onProgress: onProgress,\n      onError: onError,\n      fileList: mergedFileList,\n      upload: upload.current\n    };\n  });\n  var _React$useContext = React.useContext(ConfigContext),\n    getPrefixCls = _React$useContext.getPrefixCls,\n    direction = _React$useContext.direction;\n  var prefixCls = getPrefixCls('upload', customizePrefixCls);\n  var rcUploadProps = Object.assign(Object.assign({\n    onBatchStart: onBatchStart,\n    onError: onError,\n    onProgress: onProgress,\n    onSuccess: onSuccess\n  }, props), {\n    data: data,\n    multiple: multiple,\n    action: action,\n    accept: accept,\n    supportServerRender: supportServerRender,\n    prefixCls: prefixCls,\n    disabled: mergedDisabled,\n    beforeUpload: mergedBeforeUpload,\n    onChange: undefined\n  });\n  delete rcUploadProps.className;\n  delete rcUploadProps.style;\n  // Remove id to avoid open by label when trigger is hidden\n  // !children: https://github.com/ant-design/ant-design/issues/14298\n  // disabled: https://github.com/ant-design/ant-design/issues/16478\n  //           https://github.com/ant-design/ant-design/issues/24197\n  if (!children || mergedDisabled) {\n    delete rcUploadProps.id;\n  }\n  var _useStyle = useStyle(prefixCls),\n    _useStyle2 = _slicedToArray(_useStyle, 2),\n    wrapSSR = _useStyle2[0],\n    hashId = _useStyle2[1];\n  var renderUploadList = function renderUploadList(button, buttonVisible) {\n    return showUploadList ? /*#__PURE__*/React.createElement(LocaleReceiver, {\n      componentName: \"Upload\",\n      defaultLocale: defaultLocale.Upload\n    }, function (contextLocale) {\n      var _ref = typeof showUploadList === 'boolean' ? {} : showUploadList,\n        showRemoveIcon = _ref.showRemoveIcon,\n        showPreviewIcon = _ref.showPreviewIcon,\n        showDownloadIcon = _ref.showDownloadIcon,\n        removeIcon = _ref.removeIcon,\n        previewIcon = _ref.previewIcon,\n        downloadIcon = _ref.downloadIcon;\n      return /*#__PURE__*/React.createElement(UploadList, {\n        prefixCls: prefixCls,\n        listType: listType,\n        items: mergedFileList,\n        previewFile: previewFile,\n        onPreview: onPreview,\n        onDownload: onDownload,\n        onRemove: handleRemove,\n        showRemoveIcon: !mergedDisabled && showRemoveIcon,\n        showPreviewIcon: showPreviewIcon,\n        showDownloadIcon: showDownloadIcon,\n        removeIcon: removeIcon,\n        previewIcon: previewIcon,\n        downloadIcon: downloadIcon,\n        iconRender: iconRender,\n        locale: Object.assign(Object.assign({}, contextLocale), propLocale),\n        isImageUrl: isImageUrl,\n        progress: progress,\n        appendAction: button,\n        appendActionVisible: buttonVisible,\n        itemRender: itemRender\n      });\n    }) : button;\n  };\n  var rtlCls = _defineProperty({}, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl');\n  if (type === 'drag') {\n    var _classNames;\n    var dragCls = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag\"), true), _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag-uploading\"), mergedFileList.some(function (file) {\n      return file.status === 'uploading';\n    })), _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag-hover\"), dragState === 'dragover'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), mergedDisabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), hashId);\n    return wrapSSR( /*#__PURE__*/React.createElement(\"span\", {\n      className: classNames(\"\".concat(prefixCls, \"-wrapper\"), rtlCls, className, hashId)\n    }, /*#__PURE__*/React.createElement(\"div\", {\n      className: dragCls,\n      onDrop: onFileDrop,\n      onDragOver: onFileDrop,\n      onDragLeave: onFileDrop,\n      style: style\n    }, /*#__PURE__*/React.createElement(RcUpload, Object.assign({}, rcUploadProps, {\n      ref: upload,\n      className: \"\".concat(prefixCls, \"-btn\")\n    }), /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-drag-container\")\n    }, children))), renderUploadList()));\n  }\n  var uploadButtonCls = classNames(prefixCls, \"\".concat(prefixCls, \"-select\"), _defineProperty({}, \"\".concat(prefixCls, \"-disabled\"), mergedDisabled));\n  var renderUploadButton = function renderUploadButton(uploadButtonStyle) {\n    return /*#__PURE__*/React.createElement(\"div\", {\n      className: uploadButtonCls,\n      style: uploadButtonStyle\n    }, /*#__PURE__*/React.createElement(RcUpload, Object.assign({}, rcUploadProps, {\n      ref: upload\n    })));\n  };\n  var uploadButton = renderUploadButton(children ? undefined : {\n    display: 'none'\n  });\n  if (listType === 'picture-card') {\n    return wrapSSR( /*#__PURE__*/React.createElement(\"span\", {\n      className: classNames(\"\".concat(prefixCls, \"-wrapper\"), \"\".concat(prefixCls, \"-picture-card-wrapper\"), rtlCls, className, hashId)\n    }, renderUploadList(uploadButton, !!children)));\n  }\n  return wrapSSR( /*#__PURE__*/React.createElement(\"span\", {\n    className: classNames(\"\".concat(prefixCls, \"-wrapper\"), rtlCls, className, hashId)\n  }, uploadButton, renderUploadList()));\n};\nvar Upload = /*#__PURE__*/React.forwardRef(InternalUpload);\nif (process.env.NODE_ENV !== 'production') {\n  Upload.displayName = 'Upload';\n}\nexport default Upload;","map":{"version":3,"names":["_toConsumableArray","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","classNames","RcUpload","useMergedState","React","flushSync","ConfigContext","DisabledContext","LocaleReceiver","defaultLocale","warning","UploadList","file2Obj","getFileItem","removeFileItem","updateFileList","useStyle","LIST_IGNORE","Date","now","InternalUpload","props","ref","fileList","defaultFileList","onRemove","showUploadList","listType","onPreview","onDownload","onChange","onDrop","previewFile","customDisabled","disabled","propLocale","locale","iconRender","isImageUrl","progress","customizePrefixCls","prefixCls","className","type","children","style","itemRender","maxCount","data","multiple","action","accept","supportServerRender","useContext","mergedDisabled","postState","list","mergedFileList","setMergedFileList","useState","dragState","setDragState","upload","useRef","process","env","NODE_ENV","useMemo","timestamp","forEach","file","index","uid","Object","isFrozen","onInternalChange","changedFileList","event","cloneList","slice","changeInfo","mergedBeforeUpload","fileListArgs","beforeUpload","transformFile","parsedFile","defineProperty","configurable","onBatchStart","batchFileInfoList","filteredFileInfoList","filter","info","length","objectFileList","map","newFileList","fileObj","triggerFileObj","originFileObj","clone","File","name","Blob","lastModifiedDate","lastModified","getTime","status","onSuccess","response","xhr","JSON","parse","targetItem","percent","nextFileList","onProgress","onError","error","handleRemove","currentFile","ret","_a","removedFileList","assign","item","matchKey","undefined","current","abort","onFileDrop","useImperativeHandle","getPrefixCls","direction","rcUploadProps","id","wrapSSR","hashId","renderUploadList","button","buttonVisible","createElement","componentName","Upload","contextLocale","showRemoveIcon","showPreviewIcon","showDownloadIcon","removeIcon","previewIcon","downloadIcon","items","appendAction","appendActionVisible","rtlCls","dragCls","some","onDragOver","onDragLeave","uploadButtonCls","renderUploadButton","uploadButtonStyle","uploadButton","display","forwardRef","displayName"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/upload/Upload.js"],"sourcesContent":["import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n  function adopt(value) {\n    return value instanceof P ? value : new P(function (resolve) {\n      resolve(value);\n    });\n  }\n  return new (P || (P = Promise))(function (resolve, reject) {\n    function fulfilled(value) {\n      try {\n        step(generator.next(value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function rejected(value) {\n      try {\n        step(generator[\"throw\"](value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function step(result) {\n      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n    }\n    step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n};\nimport classNames from 'classnames';\nimport RcUpload from 'rc-upload';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport * as React from 'react';\nimport { flushSync } from 'react-dom';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport LocaleReceiver from '../locale/LocaleReceiver';\nimport defaultLocale from '../locale/en_US';\nimport warning from '../_util/warning';\nimport UploadList from './UploadList';\nimport { file2Obj, getFileItem, removeFileItem, updateFileList } from './utils';\nimport useStyle from './style';\nexport const LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;\nconst InternalUpload = (props, ref) => {\n  const {\n    fileList,\n    defaultFileList,\n    onRemove,\n    showUploadList = true,\n    listType = 'text',\n    onPreview,\n    onDownload,\n    onChange,\n    onDrop,\n    previewFile,\n    disabled: customDisabled,\n    locale: propLocale,\n    iconRender,\n    isImageUrl,\n    progress,\n    prefixCls: customizePrefixCls,\n    className,\n    type = 'select',\n    children,\n    style,\n    itemRender,\n    maxCount,\n    data = {},\n    multiple = false,\n    action = '',\n    accept = '',\n    supportServerRender = true\n  } = props;\n  // ===================== Disabled =====================\n  const disabled = React.useContext(DisabledContext);\n  const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n  const [mergedFileList, setMergedFileList] = useMergedState(defaultFileList || [], {\n    value: fileList,\n    postState: list => list !== null && list !== void 0 ? list : []\n  });\n  const [dragState, setDragState] = React.useState('drop');\n  const upload = React.useRef(null);\n  process.env.NODE_ENV !== \"production\" ? warning('fileList' in props || !('value' in props), 'Upload', '`value` is not a valid prop, do you mean `fileList`?') : void 0;\n  process.env.NODE_ENV !== \"production\" ? warning(!('transformFile' in props), 'Upload', '`transformFile` is deprecated. Please use `beforeUpload` directly.') : void 0;\n  // Control mode will auto fill file uid if not provided\n  React.useMemo(() => {\n    const timestamp = Date.now();\n    (fileList || []).forEach((file, index) => {\n      if (!file.uid && !Object.isFrozen(file)) {\n        file.uid = `__AUTO__${timestamp}_${index}__`;\n      }\n    });\n  }, [fileList]);\n  const onInternalChange = (file, changedFileList, event) => {\n    let cloneList = _toConsumableArray(changedFileList);\n    // Cut to match count\n    if (maxCount === 1) {\n      cloneList = cloneList.slice(-1);\n    } else if (maxCount) {\n      cloneList = cloneList.slice(0, maxCount);\n    }\n    // Prevent React18 auto batch since input[upload] trigger process at same time\n    // which makes fileList closure problem\n    flushSync(() => {\n      setMergedFileList(cloneList);\n    });\n    const changeInfo = {\n      file: file,\n      fileList: cloneList\n    };\n    if (event) {\n      changeInfo.event = event;\n    }\n    onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo);\n  };\n  const mergedBeforeUpload = (file, fileListArgs) => __awaiter(void 0, void 0, void 0, function* () {\n    const {\n      beforeUpload,\n      transformFile\n    } = props;\n    let parsedFile = file;\n    if (beforeUpload) {\n      const result = yield beforeUpload(file, fileListArgs);\n      if (result === false) {\n        return false;\n      }\n      // Hack for LIST_IGNORE, we add additional info to remove from the list\n      delete file[LIST_IGNORE];\n      if (result === LIST_IGNORE) {\n        Object.defineProperty(file, LIST_IGNORE, {\n          value: true,\n          configurable: true\n        });\n        return false;\n      }\n      if (typeof result === 'object' && result) {\n        parsedFile = result;\n      }\n    }\n    if (transformFile) {\n      parsedFile = yield transformFile(parsedFile);\n    }\n    return parsedFile;\n  });\n  const onBatchStart = batchFileInfoList => {\n    // Skip file which marked as `LIST_IGNORE`, these file will not add to file list\n    const filteredFileInfoList = batchFileInfoList.filter(info => !info.file[LIST_IGNORE]);\n    // Nothing to do since no file need upload\n    if (!filteredFileInfoList.length) {\n      return;\n    }\n    const objectFileList = filteredFileInfoList.map(info => file2Obj(info.file));\n    // Concat new files with prev files\n    let newFileList = _toConsumableArray(mergedFileList);\n    objectFileList.forEach(fileObj => {\n      // Replace file if exist\n      newFileList = updateFileList(fileObj, newFileList);\n    });\n    objectFileList.forEach((fileObj, index) => {\n      // Repeat trigger `onChange` event for compatible\n      let triggerFileObj = fileObj;\n      if (!filteredFileInfoList[index].parsedFile) {\n        // `beforeUpload` return false\n        const {\n          originFileObj\n        } = fileObj;\n        let clone;\n        try {\n          clone = new File([originFileObj], originFileObj.name, {\n            type: originFileObj.type\n          });\n        } catch (e) {\n          clone = new Blob([originFileObj], {\n            type: originFileObj.type\n          });\n          clone.name = originFileObj.name;\n          clone.lastModifiedDate = new Date();\n          clone.lastModified = new Date().getTime();\n        }\n        clone.uid = fileObj.uid;\n        triggerFileObj = clone;\n      } else {\n        // Inject `uploading` status\n        fileObj.status = 'uploading';\n      }\n      onInternalChange(triggerFileObj, newFileList);\n    });\n  };\n  const onSuccess = (response, file, xhr) => {\n    try {\n      if (typeof response === 'string') {\n        response = JSON.parse(response);\n      }\n    } catch (e) {\n      /* do nothing */\n    }\n    // removed\n    if (!getFileItem(file, mergedFileList)) {\n      return;\n    }\n    const targetItem = file2Obj(file);\n    targetItem.status = 'done';\n    targetItem.percent = 100;\n    targetItem.response = response;\n    targetItem.xhr = xhr;\n    const nextFileList = updateFileList(targetItem, mergedFileList);\n    onInternalChange(targetItem, nextFileList);\n  };\n  const onProgress = (e, file) => {\n    // removed\n    if (!getFileItem(file, mergedFileList)) {\n      return;\n    }\n    const targetItem = file2Obj(file);\n    targetItem.status = 'uploading';\n    targetItem.percent = e.percent;\n    const nextFileList = updateFileList(targetItem, mergedFileList);\n    onInternalChange(targetItem, nextFileList, e);\n  };\n  const onError = (error, response, file) => {\n    // removed\n    if (!getFileItem(file, mergedFileList)) {\n      return;\n    }\n    const targetItem = file2Obj(file);\n    targetItem.error = error;\n    targetItem.response = response;\n    targetItem.status = 'error';\n    const nextFileList = updateFileList(targetItem, mergedFileList);\n    onInternalChange(targetItem, nextFileList);\n  };\n  const handleRemove = file => {\n    let currentFile;\n    Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(ret => {\n      var _a;\n      // Prevent removing file\n      if (ret === false) {\n        return;\n      }\n      const removedFileList = removeFileItem(file, mergedFileList);\n      if (removedFileList) {\n        currentFile = Object.assign(Object.assign({}, file), {\n          status: 'removed'\n        });\n        mergedFileList === null || mergedFileList === void 0 ? void 0 : mergedFileList.forEach(item => {\n          const matchKey = currentFile.uid !== undefined ? 'uid' : 'name';\n          if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) {\n            item.status = 'removed';\n          }\n        });\n        (_a = upload.current) === null || _a === void 0 ? void 0 : _a.abort(currentFile);\n        onInternalChange(currentFile, removedFileList);\n      }\n    });\n  };\n  const onFileDrop = e => {\n    setDragState(e.type);\n    if (e.type === 'drop') {\n      onDrop === null || onDrop === void 0 ? void 0 : onDrop(e);\n    }\n  };\n  // Test needs\n  React.useImperativeHandle(ref, () => ({\n    onBatchStart,\n    onSuccess,\n    onProgress,\n    onError,\n    fileList: mergedFileList,\n    upload: upload.current\n  }));\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('upload', customizePrefixCls);\n  const rcUploadProps = Object.assign(Object.assign({\n    onBatchStart,\n    onError,\n    onProgress,\n    onSuccess\n  }, props), {\n    data,\n    multiple,\n    action,\n    accept,\n    supportServerRender,\n    prefixCls,\n    disabled: mergedDisabled,\n    beforeUpload: mergedBeforeUpload,\n    onChange: undefined\n  });\n  delete rcUploadProps.className;\n  delete rcUploadProps.style;\n  // Remove id to avoid open by label when trigger is hidden\n  // !children: https://github.com/ant-design/ant-design/issues/14298\n  // disabled: https://github.com/ant-design/ant-design/issues/16478\n  //           https://github.com/ant-design/ant-design/issues/24197\n  if (!children || mergedDisabled) {\n    delete rcUploadProps.id;\n  }\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const renderUploadList = (button, buttonVisible) => showUploadList ? /*#__PURE__*/React.createElement(LocaleReceiver, {\n    componentName: \"Upload\",\n    defaultLocale: defaultLocale.Upload\n  }, contextLocale => {\n    const {\n      showRemoveIcon,\n      showPreviewIcon,\n      showDownloadIcon,\n      removeIcon,\n      previewIcon,\n      downloadIcon\n    } = typeof showUploadList === 'boolean' ? {} : showUploadList;\n    return /*#__PURE__*/React.createElement(UploadList, {\n      prefixCls: prefixCls,\n      listType: listType,\n      items: mergedFileList,\n      previewFile: previewFile,\n      onPreview: onPreview,\n      onDownload: onDownload,\n      onRemove: handleRemove,\n      showRemoveIcon: !mergedDisabled && showRemoveIcon,\n      showPreviewIcon: showPreviewIcon,\n      showDownloadIcon: showDownloadIcon,\n      removeIcon: removeIcon,\n      previewIcon: previewIcon,\n      downloadIcon: downloadIcon,\n      iconRender: iconRender,\n      locale: Object.assign(Object.assign({}, contextLocale), propLocale),\n      isImageUrl: isImageUrl,\n      progress: progress,\n      appendAction: button,\n      appendActionVisible: buttonVisible,\n      itemRender: itemRender\n    });\n  }) : button;\n  const rtlCls = {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  };\n  if (type === 'drag') {\n    const dragCls = classNames(prefixCls, {\n      [`${prefixCls}-drag`]: true,\n      [`${prefixCls}-drag-uploading`]: mergedFileList.some(file => file.status === 'uploading'),\n      [`${prefixCls}-drag-hover`]: dragState === 'dragover',\n      [`${prefixCls}-disabled`]: mergedDisabled,\n      [`${prefixCls}-rtl`]: direction === 'rtl'\n    }, hashId);\n    return wrapSSR( /*#__PURE__*/React.createElement(\"span\", {\n      className: classNames(`${prefixCls}-wrapper`, rtlCls, className, hashId)\n    }, /*#__PURE__*/React.createElement(\"div\", {\n      className: dragCls,\n      onDrop: onFileDrop,\n      onDragOver: onFileDrop,\n      onDragLeave: onFileDrop,\n      style: style\n    }, /*#__PURE__*/React.createElement(RcUpload, Object.assign({}, rcUploadProps, {\n      ref: upload,\n      className: `${prefixCls}-btn`\n    }), /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-drag-container`\n    }, children))), renderUploadList()));\n  }\n  const uploadButtonCls = classNames(prefixCls, `${prefixCls}-select`, {\n    [`${prefixCls}-disabled`]: mergedDisabled\n  });\n  const renderUploadButton = uploadButtonStyle => /*#__PURE__*/React.createElement(\"div\", {\n    className: uploadButtonCls,\n    style: uploadButtonStyle\n  }, /*#__PURE__*/React.createElement(RcUpload, Object.assign({}, rcUploadProps, {\n    ref: upload\n  })));\n  const uploadButton = renderUploadButton(children ? undefined : {\n    display: 'none'\n  });\n  if (listType === 'picture-card') {\n    return wrapSSR( /*#__PURE__*/React.createElement(\"span\", {\n      className: classNames(`${prefixCls}-wrapper`, `${prefixCls}-picture-card-wrapper`, rtlCls, className, hashId)\n    }, renderUploadList(uploadButton, !!children)));\n  }\n  return wrapSSR( /*#__PURE__*/React.createElement(\"span\", {\n    className: classNames(`${prefixCls}-wrapper`, rtlCls, className, hashId)\n  }, uploadButton, renderUploadList()));\n};\nconst Upload = /*#__PURE__*/React.forwardRef(InternalUpload);\nif (process.env.NODE_ENV !== 'production') {\n  Upload.displayName = 'Upload';\n}\nex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